<!doctype html>
<html>
        <head>
                <meta name="generator" content="JSDoc 3.6.11">
                <meta charset="utf-8">
                <title>whatsapp-web.js 1.34.2 &raquo; Class: Client</title>
                <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
                <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
                <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
                <link href="css/baseline.css" rel="stylesheet">
        </head>
        <body onload="prettyPrint()">
                <nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
    <div id="jsdoc-navbar-container">
        <div id="jsdoc-navbar-content">
            <a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>34.<wbr>2</a>
        </div>
    </div>
</nav>

                <div id="jsdoc-body-container">
                        <div id="jsdoc-content">
                                <div id="jsdoc-content-container">
                                        <div id="jsdoc-main" role="main">
                    <header class="page-header">
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div><h1><small></small><span class="symbol-name">Client</span></h1>        <p class="source-link">Source: <a href="Client.js.html#source-line-65">Client.<wbr>js:65</a></p>
            <div class="symbol-classdesc">
                <p>Starting point for interacting with the WhatsApp Web API</p>
            </div>
        <dl class="dl-compact">
            
            
            
        </dl>
</header>


    <section id="summary">
                

                

                

                

                    <div class="summary-callout">
            <h2 class="summary-callout-heading">Properties</h2>
        <div class="summary-content">
                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#info">info</a></dt>
                <dd>
                </dd>
        </dl>
</div>

                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#pupBrowser">pupBrowser</a></dt>
                <dd>
                </dd>
        </dl>
</div>

                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#pupPage">pupPage</a></dt>
                <dd>
                </dd>
        </dl>
</div>

        </div>
    </div>


                    <div class="summary-callout">
            <h2 class="summary-callout-heading">Methods</h2>
        <div class="summary-content">
                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#_muteUnmuteChat">_muteUnmuteChat(chatId, action, unmuteDateTs)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#acceptChannelAdminInvite">acceptChannelAdminInvite(channelId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#acceptGroupV4Invite">acceptGroupV4Invite(inviteInfo)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#acceptInvite">acceptInvite(inviteCode)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#addOrEditCustomerNote">addOrEditCustomerNote(userId, note)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#addOrRemoveLabels">addOrRemoveLabels(labelIds, chatIds)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#approveGroupMembershipRequests">approveGroupMembershipRequests(groupId, options)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#archiveChat">archiveChat()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#attachEventListeners">attachEventListeners()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#createCallLink">createCallLink(startTime, callType)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#createChannel">createChannel(title, options)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#createGroup">createGroup(title, participants, options)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#deleteAddressbookContact">deleteAddressbookContact(phoneNumber)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#deleteChannel">deleteChannel(channelId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#deleteProfilePicture">deleteProfilePicture()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#demoteChannelAdmin">demoteChannelAdmin(channelId, userId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#destroy">destroy()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getBlockedContacts">getBlockedContacts()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getBroadcasts">getBroadcasts()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getChannelByInviteCode">getChannelByInviteCode(inviteCode)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getChannels">getChannels()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getChatById">getChatById(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getChatLabels">getChatLabels(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getChats">getChats()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getChatsByLabelId">getChatsByLabelId(labelId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getCommonGroups">getCommonGroups(contactId)</a></dt>
                <dd>
                </dd>
        </dl>
</div>

                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#getContactById">getContactById(contactId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getContactDeviceCount">getContactDeviceCount(userId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getContactLidAndPhone">getContactLidAndPhone(userIds)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getContacts">getContacts()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getCountryCode">getCountryCode(number)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getCustomerNote">getCustomerNote(userId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getFormattedNumber">getFormattedNumber(number)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getGroupMembershipRequests">getGroupMembershipRequests(groupId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getInviteInfo">getInviteInfo(inviteCode)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getLabelById">getLabelById(labelId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getLabels">getLabels()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getNumberId">getNumberId(number)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getPinnedMessages">getPinnedMessages(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getPollVotes">getPollVotes(messageId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getProfilePicUrl">getProfilePicUrl(contactId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getState">getState()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#getWWebVersion">getWWebVersion()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#initialize">initialize()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#inject">inject()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#isRegisteredUser">isRegisteredUser(id)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#logout">logout()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#markChatUnread">markChatUnread(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#muteChat">muteChat(chatId, unmuteDate)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#pinChat">pinChat()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#rejectGroupMembershipRequests">rejectGroupMembershipRequests(groupId, options)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#requestPairingCode">requestPairingCode(phoneNumber[, showNotification][, intervalMs])</a></dt>
                <dd>
                </dd>
        </dl>
</div>

                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#resetState">resetState()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#revokeChannelAdminInvite">revokeChannelAdminInvite(channelId, userId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#saveOrEditAddressbookContact">saveOrEditAddressbookContact(phoneNumber, firstName, lastName[, syncToAddressbook])</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#searchChannels">searchChannels(searchOptions)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#searchMessages">searchMessages(query[, options])</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#sendChannelAdminInvite">sendChannelAdminInvite(chatId, channelId, options)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#sendMessage">sendMessage(chatId, content[, options])</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#sendPresenceAvailable">sendPresenceAvailable()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#sendPresenceUnavailable">sendPresenceUnavailable()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#sendResponseToScheduledEvent">sendResponseToScheduledEvent(response, eventMessageId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#sendSeen">sendSeen(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setAutoDownloadAudio">setAutoDownloadAudio(flag)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setAutoDownloadDocuments">setAutoDownloadDocuments(flag)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setAutoDownloadPhotos">setAutoDownloadPhotos(flag)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setAutoDownloadVideos">setAutoDownloadVideos(flag)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setBackgroundSync">setBackgroundSync(flag)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setDisplayName">setDisplayName(displayName)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setProfilePicture">setProfilePicture(media)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#setStatus">setStatus(status)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#subscribeToChannel">subscribeToChannel(channelId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#syncHistory">syncHistory(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#transferChannelOwnership">transferChannelOwnership(channelId, newOwnerId, options)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#unarchiveChat">unarchiveChat()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#unmuteChat">unmuteChat(chatId)</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#unpinChat">unpinChat()</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#unsubscribeFromChannel">unsubscribeFromChannel(channelId, options)</a></dt>
                <dd>
                </dd>
        </dl>
</div>

        </div>
    </div>


                

                    <div class="summary-callout">
            <h2 class="summary-callout-heading">Events</h2>
        <div class="summary-content">
                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#event:auth_failure">auth_failure</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:authenticated">authenticated</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:change_battery">change_battery</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:change_state">change_state</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:chat_archived">chat_archived</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:chat_removed">chat_removed</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:code">code</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:contact_changed">contact_changed</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:disconnected">disconnected</a></dt>
                <dd>
                </dd>
        </dl>
</div>

                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#event:group_admin_changed">group_admin_changed</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:group_join">group_join</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:group_leave">group_leave</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:group_membership_request">group_membership_request</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:group_update">group_update</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:incoming_call">incoming_call</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:media_uploaded">media_uploaded</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message">message</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message_ack">message_ack</a></dt>
                <dd>
                </dd>
        </dl>
</div>

                    <div class="summary-column">
        <dl class="dl-summary-callout">
                <dt><a href="Client.html#event:message_ciphertext">message_ciphertext</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message_create">message_create</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message_edit">message_edit</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message_reaction">message_reaction</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message_revoke_everyone">message_revoke_everyone</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:message_revoke_me">message_revoke_me</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:qr">qr</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:ready">ready</a></dt>
                <dd>
                </dd>
                <dt><a href="Client.html#event:vote_update">vote_update</a></dt>
                <dd>
                </dd>
        </dl>
</div>

        </div>
    </div>

    </section>



        <section>
                <h2 id="Client">new&nbsp;<span class="symbol-name">Client</span><span class="signature"><span class="signature-params">(options)</span></span></h2>        
        
            <section>
        <h3>Parameters</h3>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Client options</p>
                <p>Values in <code>options</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>authStrategy</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Determines how to save and restore sessions. Will use LegacySessionAuth if options.session is set. Otherwise, NoAuth will be used.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>webVersion</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The version of WhatsApp Web to use. Use options.webVersionCache to configure how the version is retrieved.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>webVersionCache</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Determines how to retrieve the WhatsApp Web version. Defaults to a local cache (LocalWebCache) that falls back to latest if the requested version is not found.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>authTimeoutMs</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Timeout for authentication selector in puppeteer</p>
        </td>
</tr>

                <tr>
        <td>
            <p>puppeteer</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Puppeteer launch options. View docs here: https://github.com/puppeteer/puppeteer/</p>
        </td>
</tr>

                <tr>
        <td>
            <p>qrMaxRetries</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>How many times should the qrcode be refreshed before giving up</p>
        </td>
</tr>

                <tr>
        <td>
            <p>restartOnAuthFail</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>@deprecated This option should be set directly on the LegacySessionAuth.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>session</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>@deprecated Only here for backwards-compatibility. You should move to using LocalAuth, or set the authStrategy to LegacySessionAuth explicitly.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>takeoverOnConflict</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>If another whatsapp web session is detected (another browser), take over the session in the current browser</p>
        </td>
</tr>

                <tr>
        <td>
            <p>takeoverTimeoutMs</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>How much time to wait before taking over the session</p>
        </td>
</tr>

                <tr>
        <td>
            <p>userAgent</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>User agent to use in puppeteer</p>
        </td>
</tr>

                <tr>
        <td>
            <p>ffmpegPath</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Ffmpeg path to use when formatting videos to webp while sending stickers</p>
        </td>
</tr>

                <tr>
        <td>
            <p>bypassCSP</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Sets bypassing of page's Content-Security-Policy.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>deviceName</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Sets the device name of a current linked device., i.e.: 'TEST'.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>browserName</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Sets the browser name of a current linked device, i.e.: 'Firefox'.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>proxyAuthentication</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Proxy Authentication object.</p>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
                <dt>Extends</dt>
        <dd>EventEmitter</dd>
















    <dt>Fires</dt>
        <dd><a href="Client.html#event:qr">Client#event:qr</a></dd>
        <dd><a href="Client.html#event:authenticated">Client#event:authenticated</a></dd>
        <dd><a href="Client.html#event:auth_failure">Client#event:auth_failure</a></dd>
        <dd><a href="Client.html#event:ready">Client#event:ready</a></dd>
        <dd><a href="Client.html#event:message">Client#event:message</a></dd>
        <dd><a href="Client.html#event:message_ack">Client#event:message_ack</a></dd>
        <dd><a href="Client.html#event:message_create">Client#event:message_create</a></dd>
        <dd><a href="Client.html#event:message_revoke_me">Client#event:message_revoke_me</a></dd>
        <dd><a href="Client.html#event:message_revoke_everyone">Client#event:message_revoke_everyone</a></dd>
        <dd><a href="Client.html#event:message_ciphertext">Client#event:message_ciphertext</a></dd>
        <dd><a href="Client.html#event:message_edit">Client#event:message_edit</a></dd>
        <dd><a href="Client.html#event:media_uploaded">Client#event:media_uploaded</a></dd>
        <dd><a href="Client.html#event:group_join">Client#event:group_join</a></dd>
        <dd><a href="Client.html#event:group_leave">Client#event:group_leave</a></dd>
        <dd><a href="Client.html#event:group_update">Client#event:group_update</a></dd>
        <dd><a href="Client.html#event:disconnected">Client#event:disconnected</a></dd>
        <dd><a href="Client.html#event:change_state">Client#event:change_state</a></dd>
        <dd><a href="Client.html#event:contact_changed">Client#event:contact_changed</a></dd>
        <dd><a href="Client.html#event:group_admin_changed">Client#event:group_admin_changed</a></dd>
        <dd><a href="Client.html#event:group_membership_request">Client#event:group_membership_request</a></dd>
        <dd><a href="Client.html#event:vote_update">Client#event:vote_update</a></dd>







        </dl>

        </section>


            <section>
            

            

            

                <h2>Properties</h2>
    <section>
                <h3 id="info"><span class="symbol-name">info</span><small class="property-type">
            &nbsp;<a href="ClientInfo.html">ClientInfo</a></small></h3>            <p>Current connection information</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="pupBrowser"><span class="symbol-name">pupBrowser</span><small class="property-type">
            &nbsp;puppeteer.Browser</small></h3>        
        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="pupPage"><span class="symbol-name">pupPage</span><small class="property-type">
            &nbsp;puppeteer.Page</small></h3>        
        
        
        

        <dl class="dl-compact">
            






















        </dl>

    </section>


                <h2>Methods</h2>
    <section>
                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="_muteUnmuteChat"><span class="symbol-name">_muteUnmuteChat</span><span class="signature"><span class="signature-params">(chatId, action, unmuteDateTs)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing {isMuted: boolean, muteExpiration: number}</span></span></h3>            <p>Internal method to mute or unmute the chat</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>ID of the chat that will be muted/unmuted</p>
        </td>
</tr>

                <tr>
        <td>
            <p>action</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The action: 'MUTE' or 'UNMUTE'</p>
        </td>
</tr>

                <tr>
        <td>
            <p>unmuteDateTs</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Timestamp at which the chat will be unmuted</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing {isMuted: boolean, muteExpiration: number}</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="acceptChannelAdminInvite"><span class="symbol-name">acceptChannelAdminInvite</span><span class="signature"><span class="signature-params">(channelId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Accepts a channel admin invitation and promotes the current user to a channel admin</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The channel ID to accept the admin invitation from</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="acceptGroupV4Invite"><span class="symbol-name">acceptGroupV4Invite</span><span class="signature"><span class="signature-params">(inviteInfo)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Object</span></span></h3>            <p>Accepts a private invitation to join a group</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>inviteInfo</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Invite V4 Info</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Object</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="acceptInvite"><span class="symbol-name">acceptInvite</span><span class="signature"><span class="signature-params">(inviteCode)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Accepts an invitation to join a group</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>inviteCode</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Invitation code</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> <p>Id of the joined Chat</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="addOrEditCustomerNote"><span class="symbol-name">addOrEditCustomerNote</span><span class="signature"><span class="signature-params">(userId, note)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing void</span></span></h3>            <p>Add or edit a customer note</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>userId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The ID of a customer to add a note to</p>
        </td>
</tr>

                <tr>
        <td>
            <p>note</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The note to add</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            












    <dt>See also</dt>
        <dd><a href="https://faq.whatsapp.com/1433099287594476">https://faq.whatsapp.com/1433099287594476</a></dd>







    <dt>Returns</dt>
        <dd><p><code>Promise containing void</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="addOrRemoveLabels"><span class="symbol-name">addOrRemoveLabels</span><span class="signature"><span class="signature-params">(labelIds, chatIds)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing void</span></span></h3>            <p>Change labels in chats</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>labelIds</p>
        </td>
        <td>
                <p>Array of (number or string)</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>chatIds</p>
        </td>
        <td>
                <p>Array of string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing void</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="approveGroupMembershipRequests"><span class="symbol-name">approveGroupMembershipRequests</span><span class="signature"><span class="signature-params">(groupId, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></span></span></h3>            <p>Approves membership requests if any</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>groupId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The group ID to get the membership request for</p>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#MembershipRequestActionOptions">MembershipRequestActionOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Options for performing a membership request action</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></code> <p>Returns an array of requester IDs whose membership requests were approved and an error for each requester, if any occurred during the operation. If there are no requests, an empty array will be returned</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="archiveChat"><span class="symbol-name">archiveChat</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> boolean</span></span></h3>            <p>Enables and returns the archive state of the Chat</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>boolean</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="attachEventListeners"><span class="symbol-name">attachEventListeners</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Attach event listeners to WA Web
Private function</p>

        
        
            <section>
        <h4>Property</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>reinject</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>is this a reinject?</p>
        </td>
</tr>

        </tbody>
</table>

    </section>


        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="createCallLink"><span class="symbol-name">createCallLink</span><span class="signature"><span class="signature-params">(startTime, callType)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Generates a WhatsApp call link (video call or voice call)</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>startTime</p>
        </td>
        <td>
                <p>Date</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The start time of the call</p>
        </td>
</tr>

                <tr>
        <td>
            <p>callType</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The type of a WhatsApp call link to generate, valid values are: <code>video</code> | <code>voice</code></p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> <p>The WhatsApp call link (https://call.whatsapp.com/video/XxXxXxXxXxXxXx) or an empty string if a generation failed.</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="createChannel"><span class="symbol-name">createChannel</span><span class="signature"><span class="signature-params">(title, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing (<a href="global.html#CreateChannelResult">CreateChannelResult</a> or string)</span></span></h3>            <p>Creates a new channel</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>title</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The channel name</p>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#CreateChannelOptions">CreateChannelOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing (<a href="global.html#CreateChannelResult">CreateChannelResult</a> or string)</code> <p>Returns an object that handles the result for the channel creation or an error message as a string</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="createGroup"><span class="symbol-name">createGroup</span><span class="signature"><span class="signature-params">(title, participants, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing (<a href="global.html#CreateGroupResult">CreateGroupResult</a> or string)</span></span></h3>            <p>Creates a new group</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>title</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Group title</p>
        </td>
</tr>

                <tr>
        <td>
            <p>participants</p>
        </td>
        <td>
                <p>(string, <a href="Contact.html">Contact</a>, Array of (<a href="Contact.html">Contact</a> or string), or undefined)</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>A single Contact object or an ID as a string or an array of Contact objects or contact IDs to add to the group</p>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#CreateGroupOptions">CreateGroupOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>An object that handles options for group creation</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing (<a href="global.html#CreateGroupResult">CreateGroupResult</a> or string)</code> <p>Object with resulting data or an error message as a string</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="deleteAddressbookContact"><span class="symbol-name">deleteAddressbookContact</span><span class="signature"><span class="signature-params">(phoneNumber)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing void</span></span></h3>            <p>Deletes the contact from user's addressbook</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>phoneNumber</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The contact's phone number in a format &quot;17182222222&quot;, where &quot;1&quot; is a country code</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing void</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="deleteChannel"><span class="symbol-name">deleteChannel</span><span class="signature"><span class="signature-params">(channelId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Deletes the channel you created</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The ID of a channel to delete</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="deleteProfilePicture"><span class="symbol-name">deleteProfilePicture</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Deletes the current user's profile picture.</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the picture was properly deleted.</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="demoteChannelAdmin"><span class="symbol-name">demoteChannelAdmin</span><span class="signature"><span class="signature-params">(channelId, userId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Demotes a channel admin to a regular subscriber (can be used also for self-demotion)</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The channel ID to demote an admin in</p>
        </td>
</tr>

                <tr>
        <td>
            <p>userId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The user ID to demote</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="destroy"><span class="symbol-name">destroy</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Closes the client</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getBlockedContacts"><span class="symbol-name">getBlockedContacts</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Contact.html">Contact</a></span></span></h3>            <p>Gets all blocked contacts by host account</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Contact.html">Contact</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getBroadcasts"><span class="symbol-name">getBroadcasts</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Broadcast.html">Broadcast</a></span></span></h3>            <p>Get all current Broadcast</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Broadcast.html">Broadcast</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getChannelByInviteCode"><span class="symbol-name">getChannelByInviteCode</span><span class="signature"><span class="signature-params">(inviteCode)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing <a href="Channel.html">Channel</a></span></span></h3>            <p>Gets a <a href="Channel.html"><code>Channel</code></a> instance by invite code</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>inviteCode</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The code that comes after the 'https://whatsapp.com/channel/'</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing <a href="Channel.html">Channel</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getChannels"><span class="symbol-name">getChannels</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Channel.html">Channel</a></span></span></h3>            <p>Gets all cached <a href="Channel.html"><code>Channel</code></a> instance</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Channel.html">Channel</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getChatById"><span class="symbol-name">getChatById</span><span class="signature"><span class="signature-params">(chatId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing (<a href="Chat.html">Chat</a> or <a href="Channel.html">Channel</a>)</span></span></h3>            <p>Gets chat or channel instance by ID</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing (<a href="Chat.html">Chat</a> or <a href="Channel.html">Channel</a>)</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getChatLabels"><span class="symbol-name">getChatLabels</span><span class="signature"><span class="signature-params">(chatId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Label.html">Label</a></span></span></h3>            <p>Get all Labels assigned to a chat</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Label.html">Label</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getChats"><span class="symbol-name">getChats</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Chat.html">Chat</a></span></span></h3>            <p>Get all current chat instances</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Chat.html">Chat</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getChatsByLabelId"><span class="symbol-name">getChatsByLabelId</span><span class="signature"><span class="signature-params">(labelId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Chat.html">Chat</a></span></span></h3>            <p>Get all Chats for a specific Label</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>labelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Chat.html">Chat</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getCommonGroups"><span class="symbol-name">getCommonGroups</span><span class="signature"><span class="signature-params">(contactId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of WAWebJS.ChatId</span></span></h3>            <p>Gets the Contact's common groups with you. Returns empty array if you don't have any common group.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>contactId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>the whatsapp user's ID (_serialized format)</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of WAWebJS.ChatId</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getContactById"><span class="symbol-name">getContactById</span><span class="signature"><span class="signature-params">(contactId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing <a href="Contact.html">Contact</a></span></span></h3>            <p>Get contact instance by ID</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>contactId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing <a href="Contact.html">Contact</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getContactDeviceCount"><span class="symbol-name">getContactDeviceCount</span><span class="signature"><span class="signature-params">(userId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing number</span></span></h3>            <p>Get user device count by ID
Each WaWeb Connection counts as one device, and the phone (if exists) counts as one
So for a non-enterprise user with one WaWeb connection it should return &quot;2&quot;</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>userId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing number</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getContactLidAndPhone"><span class="symbol-name">getContactLidAndPhone</span><span class="signature"><span class="signature-params">(userIds)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of {lid: string, pn: string}</span></span></h3>            <p>Get lid and phone number for multiple users</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>userIds</p>
        </td>
        <td>
                <p>Array of string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Array of user IDs</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of {lid: string, pn: string}</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getContacts"><span class="symbol-name">getContacts</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Contact.html">Contact</a></span></span></h3>            <p>Get all current contact instances</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Contact.html">Contact</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getCountryCode"><span class="symbol-name">getCountryCode</span><span class="signature"><span class="signature-params">(number)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Get the country code of a WhatsApp ID.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>number</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Number or ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getCustomerNote"><span class="symbol-name">getCustomerNote</span><span class="signature"><span class="signature-params">(userId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing {chatId: string, content: string, createdAt: number, id: string, modifiedAt: number, type: string}</span></span></h3>            <p>Get a customer note</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>userId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The ID of a customer to get a note from</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            












    <dt>See also</dt>
        <dd><a href="https://faq.whatsapp.com/1433099287594476">https://faq.whatsapp.com/1433099287594476</a></dd>







    <dt>Returns</dt>
        <dd><p><code>Promise containing {chatId: string, content: string, createdAt: number, id: string, modifiedAt: number, type: string}</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getFormattedNumber"><span class="symbol-name">getFormattedNumber</span><span class="signature"><span class="signature-params">(number)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Get the formatted number of a WhatsApp ID.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>number</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Number or ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getGroupMembershipRequests"><span class="symbol-name">getGroupMembershipRequests</span><span class="signature"><span class="signature-params">(groupId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="global.html#GroupMembershipRequest">GroupMembershipRequest</a></span></span></h3>            <p>Gets an array of membership requests</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>groupId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The ID of a group to get membership requests for</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="global.html#GroupMembershipRequest">GroupMembershipRequest</a></code> <p>An array of membership requests</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getInviteInfo"><span class="symbol-name">getInviteInfo</span><span class="signature"><span class="signature-params">(inviteCode)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing object</span></span></h3>            <p>Returns an object with information about the invite code's group</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>inviteCode</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing object</code> <p>Invite information</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getLabelById"><span class="symbol-name">getLabelById</span><span class="signature"><span class="signature-params">(labelId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing <a href="Label.html">Label</a></span></span></h3>            <p>Get Label instance by ID</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>labelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing <a href="Label.html">Label</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getLabels"><span class="symbol-name">getLabels</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Label.html">Label</a></span></span></h3>            <p>Get all current Labels</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Label.html">Label</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getNumberId"><span class="symbol-name">getNumberId</span><span class="signature"><span class="signature-params">(number)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing (Object or null)</span></span></h3>            <p>Get the registered WhatsApp ID for a number.
Will return null if the number is not registered on WhatsApp.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>number</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Number or ID (&quot;@c.us&quot; will be automatically appended if not specified)</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing (Object or null)</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getPinnedMessages"><span class="symbol-name">getPinnedMessages</span><span class="signature"><span class="signature-params">(chatId)</span></span></h3>            <p>Gets instances of all pinned messages in a chat</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The chat ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getPollVotes"><span class="symbol-name">getPollVotes</span><span class="signature"><span class="signature-params">(messageId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="PollVote.html">PollVote</a></span></span></h3>            <p>Get Poll Votes</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>messageId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="PollVote.html">PollVote</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getProfilePicUrl"><span class="symbol-name">getProfilePicUrl</span><span class="signature"><span class="signature-params">(contactId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Returns the contact ID's profile picture URL, if privacy settings allow it</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>contactId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>the whatsapp user's ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getState"><span class="symbol-name">getState</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> <a href="global.html#WAState">WAState</a></span></span></h3>            <p>Gets the current connection state for the client</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code><a href="global.html#WAState">WAState</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="getWWebVersion"><span class="symbol-name">getWWebVersion</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Returns the version of WhatsApp Web currently being run</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="initialize"><span class="symbol-name">initialize</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Sets up events and requirements, kicks off authentication request</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="inject"><span class="symbol-name">inject</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Injection logic
Private function</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="isRegisteredUser"><span class="symbol-name">isRegisteredUser</span><span class="signature"><span class="signature-params">(id)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Boolean</span></span></h3>            <p>Check if a given ID is registered in whatsapp</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>id</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>the whatsapp user's ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Boolean</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="logout"><span class="symbol-name">logout</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Logs out the client, closing the current session</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="markChatUnread"><span class="symbol-name">markChatUnread</span><span class="signature"><span class="signature-params">(chatId)</span></span></h3>            <p>Mark the Chat as unread</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>ID of the chat that will be marked as unread</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="muteChat"><span class="symbol-name">muteChat</span><span class="signature"><span class="signature-params">(chatId, unmuteDate)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing {isMuted: boolean, muteExpiration: number}</span></span></h3>            <p>Mutes this chat forever, unless a date is specified</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>ID of the chat that will be muted</p>
        </td>
</tr>

                <tr>
        <td>
            <p>unmuteDate</p>
        </td>
        <td>
                <p>Date</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Date when the chat will be unmuted, don't provide a value to mute forever</p>
                <p>Value can be null.</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing {isMuted: boolean, muteExpiration: number}</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="pinChat"><span class="symbol-name">pinChat</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Pins the Chat</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>New pin state. Could be false if the max number of pinned chats was reached.</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="rejectGroupMembershipRequests"><span class="symbol-name">rejectGroupMembershipRequests</span><span class="signature"><span class="signature-params">(groupId, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></span></span></h3>            <p>Rejects membership requests if any</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>groupId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The group ID to get the membership request for</p>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#MembershipRequestActionOptions">MembershipRequestActionOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Options for performing a membership request action</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></code> <p>Returns an array of requester IDs whose membership requests were rejected and an error for each requester, if any occurred during the operation. If there are no requests, an empty array will be returned</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="requestPairingCode"><span class="symbol-name">requestPairingCode</span><span class="signature"><span class="signature-params">(phoneNumber[, showNotification][, intervalMs])</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>            <p>Request authentication via pairing code instead of QR code</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>phoneNumber</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Phone number in international, symbol-free format (e.g. 12025550108 for US, 551155501234 for Brazil)</p>
        </td>
</tr>

                <tr>
        <td>
            <p>showNotification</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>Show notification to pair on phone number</p>
                <p>Defaults to <code>true</code>.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>intervalMs</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>The interval in milliseconds on how frequent to generate pairing code (WhatsApp default to 3 minutes)</p>
                <p>Defaults to <code>180000</code>.</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing string</code> <ul></p>
<li>Returns a pairing code in format &quot;ABCDEFGH&quot;</li>
</ul></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="resetState"><span class="symbol-name">resetState</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Force reset of connection state for the client</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="revokeChannelAdminInvite"><span class="symbol-name">revokeChannelAdminInvite</span><span class="signature"><span class="signature-params">(channelId, userId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Revokes a channel admin invitation sent to a user by a channel owner</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The channel ID an invitation belongs to</p>
        </td>
</tr>

                <tr>
        <td>
            <p>userId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The user ID the invitation was sent to</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="saveOrEditAddressbookContact"><span class="symbol-name">saveOrEditAddressbookContact</span><span class="signature"><span class="signature-params">(phoneNumber, firstName, lastName[, syncToAddressbook])</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing void</span></span></h3>            <p>Save new contact to user's addressbook or edit the existing one</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>phoneNumber</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The contact's phone number in a format &quot;17182222222&quot;, where &quot;1&quot; is a country code</p>
        </td>
</tr>

                <tr>
        <td>
            <p>firstName</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>lastName</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>syncToAddressbook</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>If set to true, the contact will also be saved to the user's address book on their phone. False by default</p>
                <p>Defaults to <code>false</code>.</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing void</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="searchChannels"><span class="symbol-name">searchChannels</span><span class="signature"><span class="signature-params">(searchOptions)</span></span></h3>            <p>Searches for channels based on search criteria, there are some notes:</p>
<ol>
<li>The method finds only channels you are not subscribed to currently</li>
<li>If you have never been subscribed to a found channel
or you have unsubscribed from it with <code>UnsubscribeOptions.deleteLocalModels</code> set to 'true',
the lastMessage property of a found channel will be 'null'</li>
</ol>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>searchOptions</p>
        </td>
        <td>
                <p>Object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Search options</p>
                <p>Values in <code>searchOptions</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>searchText</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>Text to search</p>
                <p>Defaults to <code>''</code>.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>countryCodes</p>
        </td>
        <td>
                <p>Array of string</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>Array of country codes in 'ISO 3166-1 alpha-2' standart (@see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to search for channels created in these countries</p>
                <p>Defaults to <code>[your local region]</code>.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>skipSubscribedNewsletters</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>If true, channels that user is subscribed to won't appear in found channels</p>
                <p>Defaults to <code>false</code>.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>view</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>View type, makes sense only when the searchText is empty. Valid values to provide are:
0 for RECOMMENDED channels
1 for TRENDING channels
2 for POPULAR channels
3 for NEW channels</p>
                <p>Defaults to <code>0</code>.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>limit</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>The limit of found channels to be appear in the returnig result</p>
                <p>Defaults to <code>50</code>.</p>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="searchMessages"><span class="symbol-name">searchMessages</span><span class="signature"><span class="signature-params">(query[, options])</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Array of <a href="Message.html">Message</a></span></span></h3>            <p>Searches for messages</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>query</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p>Object</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>Values in <code>options</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>page</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>limit</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Array of <a href="Message.html">Message</a></code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="sendChannelAdminInvite"><span class="symbol-name">sendChannelAdminInvite</span><span class="signature"><span class="signature-params">(chatId, channelId, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Sends a channel admin invitation to a user, allowing them to become an admin of the channel</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The ID of a user to send the channel admin invitation to</p>
        </td>
</tr>

                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The ID of a channel for which the invitation is being sent</p>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#SendChannelAdminInviteOptions">SendChannelAdminInviteOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if an invitation was sent successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(chatId, content[, options])</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>            <p>Send a message to a specific chatId</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>content</p>
        </td>
        <td>
                <p>(string, <a href="MessageMedia.html">MessageMedia</a>, <a href="Location.html">Location</a>, <a href="Poll.html">Poll</a>, <a href="Contact.html">Contact</a>, Array of <a href="Contact.html">Contact</a>, <a href="Buttons.html">Buttons</a>, or <a href="List.html">List</a>)</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#MessageSendOptions">MessageSendOptions</a></p>
        </td>
        <td>
                <p>Yes</p>
        </td>
        <td>
                <p>Options used when sending the message</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing <a href="Message.html">Message</a></code> <p>Message that was just sent</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="sendPresenceAvailable"><span class="symbol-name">sendPresenceAvailable</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Marks the client as online</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="sendPresenceUnavailable"><span class="symbol-name">sendPresenceUnavailable</span><span class="signature"><span class="signature-params">()</span></span></h3>            <p>Marks the client as unavailable</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="sendResponseToScheduledEvent"><span class="symbol-name">sendResponseToScheduledEvent</span><span class="signature"><span class="signature-params">(response, eventMessageId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Sends a response to the scheduled event message, indicating whether a user is going to attend the event or not</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>response</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The response code to the scheduled event message. Valid values are: <code>0</code> for NONE response (removes a previous response) | <code>1</code> for GOING | <code>2</code> for NOT GOING | <code>3</code> for MAYBE going</p>
        </td>
</tr>

                <tr>
        <td>
            <p>eventMessageId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The scheduled event message ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="sendSeen"><span class="symbol-name">sendSeen</span><span class="signature"><span class="signature-params">(chatId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Mark as seen for the Chat</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>result</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setAutoDownloadAudio"><span class="symbol-name">setAutoDownloadAudio</span><span class="signature"><span class="signature-params">(flag)</span></span></h3>            <p>Setting  autoload download audio</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>flag</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>true/false</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setAutoDownloadDocuments"><span class="symbol-name">setAutoDownloadDocuments</span><span class="signature"><span class="signature-params">(flag)</span></span></h3>            <p>Setting  autoload download documents</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>flag</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>true/false</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setAutoDownloadPhotos"><span class="symbol-name">setAutoDownloadPhotos</span><span class="signature"><span class="signature-params">(flag)</span></span></h3>            <p>Setting  autoload download photos</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>flag</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>true/false</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setAutoDownloadVideos"><span class="symbol-name">setAutoDownloadVideos</span><span class="signature"><span class="signature-params">(flag)</span></span></h3>            <p>Setting  autoload download videos</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>flag</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>true/false</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setBackgroundSync"><span class="symbol-name">setBackgroundSync</span><span class="signature"><span class="signature-params">(flag)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Setting background synchronization.
NOTE: this action will take effect after you restart the client.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>flag</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>true/false</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setDisplayName"><span class="symbol-name">setDisplayName</span><span class="signature"><span class="signature-params">(displayName)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing Boolean</span></span></h3>            <p>Sets the current user's display name.
This is the name shown to WhatsApp users that have not added you as a contact beside your number in groups and in your profile.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>displayName</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>New display name</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing Boolean</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setProfilePicture"><span class="symbol-name">setProfilePicture</span><span class="signature"><span class="signature-params">(media)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Sets the current user's profile picture.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>media</p>
        </td>
        <td>
                <p><a href="MessageMedia.html">MessageMedia</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the picture was properly updated.</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="setStatus"><span class="symbol-name">setStatus</span><span class="signature"><span class="signature-params">(status)</span></span></h3>            <p>Sets the current user's status message</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>status</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>New status message</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="subscribeToChannel"><span class="symbol-name">subscribeToChannel</span><span class="signature"><span class="signature-params">(channelId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Subscribe to channel</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The channel ID</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="syncHistory"><span class="symbol-name">syncHistory</span><span class="signature"><span class="signature-params">(chatId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Sync chat history conversation</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>True if operation completed successfully, false otherwise.</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="transferChannelOwnership"><span class="symbol-name">transferChannelOwnership</span><span class="signature"><span class="signature-params">(channelId, newOwnerId, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Transfers a channel ownership to another user.
Note: the user you are transferring the channel ownership to must be a channel admin.</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>newOwnerId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#TransferChannelOwnershipOptions">TransferChannelOwnershipOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="unarchiveChat"><span class="symbol-name">unarchiveChat</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> boolean</span></span></h3>            <p>Changes and returns the archive state of the Chat</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>boolean</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="unmuteChat"><span class="symbol-name">unmuteChat</span><span class="signature"><span class="signature-params">(chatId)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing {isMuted: boolean, muteExpiration: number}</span></span></h3>            <p>Unmutes the Chat</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>ID of the chat that will be unmuted</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing {isMuted: boolean, muteExpiration: number}</code> </p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="unpinChat"><span class="symbol-name">unpinChat</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Unpins the Chat</p>

        
        
        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>New pin state</p></p></dd>



        </dl>

                <div class="symbol-detail-labels"><span class="label label-async">async</span></div><h3 id="unsubscribeFromChannel"><span class="symbol-name">unsubscribeFromChannel</span><span class="signature"><span class="signature-params">(channelId, options)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing boolean</span></span></h3>            <p>Unsubscribe from channel</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>channelId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The channel ID</p>
        </td>
</tr>

                <tr>
        <td>
            <p>options</p>
        </td>
        <td>
                <p><a href="global.html#UnsubscribeOptions">UnsubscribeOptions</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>Promise containing boolean</code> <p>Returns true if the operation completed successfully, false otherwise</p></p></dd>



        </dl>

    </section>


            

                <h2>Events</h2>
    <section>
                <h3 id="event:auth_failure"><span class="symbol-name">auth_failure</span></h3>            <p>Emitted when there has been an error while trying to restore an existing session</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:authenticated"><span class="symbol-name">authenticated</span></h3>            <p>Emitted when authentication is successful</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:change_battery"><span class="symbol-name">change_battery</span></h3>            <p>Emitted when the battery percentage for the attached device changes. Will not be sent if using multi-device.</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>batteryInfo</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Values in <code>batteryInfo</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>battery</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The current battery percentage</p>
        </td>
</tr>

                <tr>
        <td>
            <p>plugged</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Indicates if the phone is plugged in (true) or not (false)</p>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






    <dt>Deprecated</dt>
    <dd></dd>
















        </dl>

                <h3 id="event:change_state"><span class="symbol-name">change_state</span></h3>            <p>Emitted when the connection state changes</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>state</p>
        </td>
        <td>
                <p><a href="global.html#WAState">WAState</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>the new connection state</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:chat_archived"><span class="symbol-name">chat_archived</span></h3>            <p>Emitted when a chat is archived/unarchived</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chat</p>
        </td>
        <td>
                <p><a href="Chat.html">Chat</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>currState</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>prevState</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:chat_removed"><span class="symbol-name">chat_removed</span></h3>            <p>Emitted when a chat is removed</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chat</p>
        </td>
        <td>
                <p><a href="Chat.html">Chat</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:code"><span class="symbol-name">code</span></h3>            <p>Emitted when a pairing code is received</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>code</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Code</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            



















    <dt>Returns</dt>
        <dd><p><code>string</code> <p>Code that was just received</p></p></dd>



        </dl>

                <h3 id="event:contact_changed"><span class="symbol-name">contact_changed</span></h3>            <p>Emitted when a contact or a group participant changes their phone number.</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Message with more information about the event.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>oldId</p>
        </td>
        <td>
                <p>String</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The user's id (an old one) who changed their phone number
and who triggered the notification.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>newId</p>
        </td>
        <td>
                <p>String</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The user's new id after the change.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>isContact</p>
        </td>
        <td>
                <p>Boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Indicates if a contact or a group participant changed their phone number.</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:disconnected"><span class="symbol-name">disconnected</span></h3>            <p>Emitted when the client has been disconnected</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>reason</p>
        </td>
        <td>
                <p>(<a href="global.html#WAState">WAState</a> or "LOGOUT")</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>reason that caused the disconnect</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:group_admin_changed"><span class="symbol-name">group_admin_changed</span></h3>            <p>Emitted when a current user is promoted to an admin or demoted to a regular user.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>notification</p>
        </td>
        <td>
                <p><a href="GroupNotification.html">GroupNotification</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>GroupNotification with more information about the action</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:group_join"><span class="symbol-name">group_join</span></h3>            <p>Emitted when a user joins the chat via invite link or is added by an admin.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>notification</p>
        </td>
        <td>
                <p><a href="GroupNotification.html">GroupNotification</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>GroupNotification with more information about the action</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:group_leave"><span class="symbol-name">group_leave</span></h3>            <p>Emitted when a user leaves the chat or is removed by an admin.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>notification</p>
        </td>
        <td>
                <p><a href="GroupNotification.html">GroupNotification</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>GroupNotification with more information about the action</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:group_membership_request"><span class="symbol-name">group_membership_request</span></h3>            <p>Emitted when some user requested to join the group
that has the membership approval mode turned on</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>notification</p>
        </td>
        <td>
                <p><a href="GroupNotification.html">GroupNotification</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>GroupNotification with more information about the action</p>
                <p>Values in <code>notification</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>chatId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The group ID the request was made for</p>
        </td>
</tr>

                <tr>
        <td>
            <p>author</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The user ID that made a request</p>
        </td>
</tr>

                <tr>
        <td>
            <p>timestamp</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The timestamp the request was made at</p>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:group_update"><span class="symbol-name">group_update</span></h3>            <p>Emitted when group settings are updated, such as subject, description or picture.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>notification</p>
        </td>
        <td>
                <p><a href="GroupNotification.html">GroupNotification</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>GroupNotification with more information about the action</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:incoming_call"><span class="symbol-name">incoming_call</span></h3>            <p>Emitted when a call is received</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>call</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Values in <code>call</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>id</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Call id</p>
        </td>
</tr>

                <tr>
        <td>
            <p>peerJid</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Who called</p>
        </td>
</tr>

                <tr>
        <td>
            <p>isVideo</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>if is video</p>
        </td>
</tr>

                <tr>
        <td>
            <p>isGroup</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>if is group</p>
        </td>
</tr>

                <tr>
        <td>
            <p>canHandleLocally</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>if we can handle in waweb</p>
        </td>
</tr>

                <tr>
        <td>
            <p>outgoing</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>if is outgoing</p>
        </td>
</tr>

                <tr>
        <td>
            <p>webClientShouldHandle</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>If Waweb should handle</p>
        </td>
</tr>

                <tr>
        <td>
            <p>participants</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Participants</p>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:media_uploaded"><span class="symbol-name">media_uploaded</span></h3>            <p>Emitted when media has been uploaded for a message sent by the client.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message with media that was uploaded</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message"><span class="symbol-name">message</span></h3>            <p>Emitted when a new message is received.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message that was received</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_ack"><span class="symbol-name">message_ack</span></h3>            <p>Emitted when an ack event occurrs on message type.</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message that was affected</p>
        </td>
</tr>

                <tr>
        <td>
            <p>ack</p>
        </td>
        <td>
                <p><a href="global.html#MessageAck">MessageAck</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The new ACK value</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_ciphertext"><span class="symbol-name">message_ciphertext</span></h3>            <p>Emitted when messages are edited</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_create"><span class="symbol-name">message_create</span></h3>            <p>Emitted when a new message is created, which may include the current user's own messages.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message that was created</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_edit"><span class="symbol-name">message_edit</span></h3>            <p>Emitted when messages are edited</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>newBody</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

                <tr>
        <td>
            <p>prevBody</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_reaction"><span class="symbol-name">message_reaction</span></h3>            <p>Emitted when a reaction is sent, received, updated or removed</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>reaction</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Values in <code>reaction</code> have the following properties:</p>
                    <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>id</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Reaction id</p>
        </td>
</tr>

                <tr>
        <td>
            <p>orphan</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Orphan</p>
        </td>
</tr>

                <tr>
        <td>
            <p>orphanReason</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Orphan reason</p>
                <p>Value can be null.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>timestamp</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Timestamp</p>
        </td>
</tr>

                <tr>
        <td>
            <p>reaction</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Reaction</p>
        </td>
</tr>

                <tr>
        <td>
            <p>read</p>
        </td>
        <td>
                <p>boolean</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Read</p>
        </td>
</tr>

                <tr>
        <td>
            <p>msgId</p>
        </td>
        <td>
                <p>object</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Parent message id</p>
        </td>
</tr>

                <tr>
        <td>
            <p>senderId</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Sender id</p>
        </td>
</tr>

                <tr>
        <td>
            <p>ack</p>
        </td>
        <td>
                <p>number</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>Ack</p>
                <p>Value can be null.</p>
        </td>
</tr>

        </tbody>
</table>

        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_revoke_everyone"><span class="symbol-name">message_revoke_everyone</span></h3>            <p>Emitted when a message is deleted for everyone in the chat.</p>

        
            <section>
        <h4>Parameters</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message that was revoked, in its current state. It will not contain the original message's data.</p>
        </td>
</tr>

                <tr>
        <td>
            <p>revoked_msg</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message that was revoked, before it was revoked. It will contain the message's original data.
Note that due to the way this data is captured, it may be possible that this param will be undefined.</p>
                <p>Value can be null.</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:message_revoke_me"><span class="symbol-name">message_revoke_me</span></h3>            <p>Emitted when a message is deleted by the current user.</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>message</p>
        </td>
        <td>
                <p><a href="Message.html">Message</a></p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>The message that was revoked</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:qr"><span class="symbol-name">qr</span></h3>            <p>Emitted when a QR code is received</p>

        
            <section>
        <h4>Parameter</h4>
            <table class="jsdoc-details-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Type</th>
                <th>Optional</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
                <tr>
        <td>
            <p>qr</p>
        </td>
        <td>
                <p>string</p>
        </td>
        <td>
                <p>&nbsp;</p>
        </td>
        <td>
                <p>QR Code</p>
        </td>
</tr>

        </tbody>
</table>

    </section>

        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:ready"><span class="symbol-name">ready</span></h3>            <p>Emitted when the client has initialized and is ready to receive messages.</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

                <h3 id="event:vote_update"><span class="symbol-name">vote_update</span></h3>            <p>Emitted when some poll option is selected or deselected,
shows a user's current selected option(s) on the poll</p>

        
        
        

        <dl class="dl-compact">
            






















        </dl>

    </section>

</section>

                                        </div>
                                </div>
                                <nav id="jsdoc-toc-nav" role="navigation"></nav>
                        </div>
                </div>
                    <footer id="jsdoc-footer" class="jsdoc-footer">
                            <div id="jsdoc-footer-container">
                                    <p>
                                      Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on November 6, 2025.
                                    </p>
                            </div>
                    </footer>
                <script src="scripts/jquery.min.js"></script>
                <script src="scripts/tree.jquery.js"></script>
                <script src="scripts/prettify.js"></script>
                <script src="scripts/jsdoc-toc.js"></script>
                <script src="scripts/linenumber.js"></script>
                <script src="scripts/scrollanchor.js"></script>
        </body>
</html>
